package org.base.sys.service;

    import org.base.sys.VO.*;
    import org.base.sys.pojo.SysRole;
    import org.base.sys.pojo.SysUser;
import org.base.common.service.IService;
import org.base.sys.query.SysUserQuery;

    import java.security.NoSuchAlgorithmException;
    import java.util.List;

/**
 * <p>
 * 用户信息 服务类
 * </p>
 *
 * @author AutoGenerator
 * @since 2020-05-27
 */
public interface SysUserService extends IService<SysUser, SysUserQuery> {

    SysUserVO getUserVO(Long userId);

    SysUserVO getUserVOByLoginName(String loginName);

    boolean saveOrUpdateUser(SysUserVO entity) throws NoSuchAlgorithmException;

    SysUserVO getUserVOById(Long id);

    List<String> getRolesPermissions(List<SysRole> roles);

    SysUserVO login(String username, String password) throws NoSuchAlgorithmException;

    List<SysRole> getUserRoles(Long userId);


    List<MenuVO> getUserMenus(Long userId);


    boolean hasPerm(String perm);

    SysUserProfileVO getUserProfile();

    boolean updateUserProfile(SysUserVO entity);

    boolean changePassword(ChangePasswordVO changePasswordVO) throws NoSuchAlgorithmException;

    boolean resetPassword(ResetPasswordVO resetPasswordVO) throws NoSuchAlgorithmException;
}
